package Demo_0401.lianxi;

import Demo_0401.SqListClass;

/**
 * @author:zhengyilong
 * @email:1797344574@qq.com
 * @phone:13479394730
 * @desc:
 * @DateTime:2022/4/8 10:02
 **/
public class Demo3 {
    public static void main(String[] args) {
        //从序号2开始删除两个元素{1,2,3,4,5,}-->{1,2,5}
        int k = 2;//开始下标
        int n = 2;//删除数量
        Integer [] arr = {1,2,3,4,5};
        SqListClass<Integer> list = new SqListClass<>();
        list.CreateList(arr);

        for (int i=k;i<k+n;i++){
            list.Delete(k);
        }
        System.out.println(list);
    }
}

